#ifndef ABBREVIATIONSCONFIGPANEL_H
#define ABBREVIATIONSCONFIGPANEL_H

#include "abbreviations.h"
#include <M_Code_StyledTextCtrl.h>
#include <configurationpanel.h>
#include <wx/stattext.h>
#include <wx/listbox.h>
#include <wx/panel.h>
#include <wx/button.h>

class AbbreviationsConfigPanel: public cbConfigurationPanel {
  public:
    AbbreviationsConfigPanel( wxWindow* parent, Abbreviations* plugin );
    virtual ~AbbreviationsConfigPanel();
    virtual wxString GetTitle() const;
    virtual wxString GetBitmapBaseName() const;
    virtual void OnApply();
    virtual void OnCancel();
  private:
    void InitCompText();
    void AutoCompUpdate( const wxString& key, const wxString& lang );
    void ApplyColours();
    void OnAutoCompKeyword( wxCommandEvent& event );
    void OnAutoCompAdd( wxCommandEvent& event );
    void OnAutoCompDelete( wxCommandEvent& event );
    void OnLanguageSelect( wxCommandEvent& event );
    void OnLanguageAdd( wxCommandEvent& event );
    void OnLanguageCopy( wxCommandEvent& event );
    void OnLanguageDelete( wxCommandEvent& event );
    void FillLangugages();
    void FillKeywords();
    void LanguageSelected();
    int  LanguageAdd();
  private:
    M_Code_StyledTextCtrl* m_AutoCompTextControl;
    wxListBox* m_Keyword;
    wxString m_LastAutoCompKeyword;
    wxString m_LastAutoCompLanguage;
    AutoCompleteMap*  m_pCurrentAutoCompMap;
    Abbreviations* M_Code_Plugin;
    wxComboBox* m_LanguageCmb;
    DECLARE_EVENT_TABLE()
};

#endif
